import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'

const serviceName = '/sjsk-clinicmanage-service'
/*-----------签到配置-----------*/
//签到规则配置
const signInConfig = (params) => postAction(`${serviceName}/sjsk/sp/updateSignInConfig`, params)
//签到规则详情
const getSignInConfig = (params) => getAction(`${serviceName}/sjsk/sp/getSignInConfig`, params)
/*-----------签到管理-----------*/
//签到人员列表
const getSignInList = (params) => postAction(`${serviceName}/sjsk/sp/page`, params)
//签到详情
const getSignInDetail = (params) => postAction(`${serviceName}/sjsk/sp/userSignInDetail`, params)
//请假统计详情
const getOutLeaveCount = (params) => getAction(`/sjsk-person-service/sjskPerson/outLeaveCount`, params)

/*-----------风险等级评估-----------*/
const crowmanageServiceName = '/sjsk-crowmanage-service'
//风险等级评估人员列表
const getPageNewRiskLevelEval = (params) => postAction(`${crowmanageServiceName}/riskLevelEval/pageNewRiskLevelEval`, params)
const getPageNewRiskLevelEval1 = (params) => postAction(`${crowmanageServiceName}/riskLevelEval/getRiskLevelEvalRecords`, params)
//风险等级评估申请
const riskLevelEvalApply = (params) => postAction(`${crowmanageServiceName}/riskLevelEval/riskLevelEvalApply`, params)
//重新申请风险等级评估
const reRiskLevelEvalApply = (params) => postAction(`${crowmanageServiceName}/riskLevelEval/reRiskLevelEvalApply`, params)
//风险等级评估查询导出
const exportRiskLevelEval = (params) => downFile(`${crowmanageServiceName}/riskLevelEval/exportRiskLevelEval`, params, 'post')

/*-----------帮扶救助-----------*/
const scServiceName = '/sjsk-safe-and-caring-service'
//查询帮扶救助列表
const getRescueList = (params) => postAction(`${scServiceName}/rescue/list`, params)
//查询帮扶救助详情
const getRescueDetail = (id) => postAction(`${scServiceName}/rescue/detail/${id}`)
//新增帮扶救助记录
const saveRescue = (params) => postAction(`${scServiceName}/rescue/save`, params)
//更新帮扶救助记录
const updateRescue = (params) => postAction(`${scServiceName}/rescue/update`, params)
//删除帮扶救助记录
const deleteRescue = (id) => postAction(`${scServiceName}/rescue/delete/${id}`)
//导出帮扶救助记录
const exportRescue = (params) => downFile(`${scServiceName}/rescue/export`, params, 'post')

export {
  signInConfig,
  getSignInConfig,
  getSignInList,
  getSignInDetail,
  getOutLeaveCount,
  getPageNewRiskLevelEval,
  getPageNewRiskLevelEval1,
  riskLevelEvalApply,
  reRiskLevelEvalApply,
  exportRiskLevelEval,
  getRescueList,
  getRescueDetail,
  saveRescue,
  updateRescue,
  deleteRescue,
  exportRescue
}
